package com.zy.chapter5

import scala.beans.BeanProperty

/**
 * @author: zhaoyi
 * @create: 2020-04-23 23:43
 * @description: ${description}
 **/
class PersonJava(val name: String, private var age: Int, @BeanProperty val sex: Boolean, address: String) {

  println("主构造器调用，会执行{}中的所有语句, 可以利用来加载配置文件啥的")


  var other: String = _

  def this(other: String) {
    this("default", 18, true, "sh")
    this.other = other
  }

  def myAddress: String = address


}
